#ifndef _ViewCommand_h_
#define _ViewCommand_h_

#include "Command.h"

class ViewCommand : public Command {
public:
	ViewCommand() : Command(), pitch(0), type(2) {}
	ViewCommand (int q, int w, float e) : Command(q,w), pitch(e), type(2) {}
  ~ViewCommand() { }

  virtual string toString() {
		stringstream ss;
    ss << Command::toString() << " P:" << pitch;
		return ss.str();
  }

	virtual void setValues(int q, int w) {
		Command::setValues(q,w);
		pitch = 0;
	}

  virtual void save(ofstream &ofs) {
		ofs.write((char*) &type, sizeof(int));
		Command::save(ofs);
		ofs.write((char*) &pitch, sizeof(float));
  }

  virtual void load(ifstream &ifs) {
		Command::load(ifs);
		ifs.read((char*) &pitch, sizeof(float));
  }	

private:
	float pitch;
	int type;
};

#endif

